package com.yonyou.common.git;


import com.yonyou.biz.vo.GitLogContext;
import com.yonyou.demo.UserListPanel;

import javax.swing.*;
import javax.swing.border.EmptyBorder;
import java.awt.*;

/**
 * @author Regexpei
 * @date 2024/6/23 15:37
 * @description 大学列表面板
 */
public class UniversityListPanel extends JPanel {

    private JPanel contentPane;
    private JPanel bodyPane;
    private CardLayout cardLayout;

    public UniversityListPanel(GitLogContext context) {
        initUI();
        setBounds(100, 100, 800, 600);
        setMinimumSize(new Dimension(400, 300));
        contentPane = new JPanel();

        contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
        contentPane.setLayout(new BorderLayout(0, 0));
        add(contentPane);

        JPanel top = new JPanel();
        contentPane.add(top, BorderLayout.NORTH);

        top.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 5));



        bodyPane = new JPanel();
        bodyPane.setBorder(BorderFactory.createEtchedBorder());
//		bodyPane.setBorder(BorderFactory.createBevelBorder(BevelBorder.LOWERED));
//		bodyPane.setBorder(BorderFactory.createBevelBorder(BevelBorder.RAISED));
//		bodyPane.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
//		bodyPane.setBorder(BorderFactory.createLineBorder(Color.black));
//		bodyPane.setBorder(BorderFactory.createTitledBorder("正文内容"));

        contentPane.add(bodyPane, BorderLayout.CENTER);

        cardLayout = new CardLayout();
        bodyPane.setLayout(cardLayout);


        //bodyPane.add("do2", new UserListPanel());
        bodyPane.add("do2", new UserListPanel(context));
        cardLayout.show(bodyPane, "do3");

    }

    @SuppressWarnings("AlibabaLowerCamelCaseVariableNaming")
    private void initUI() {
        setLayout(new BorderLayout());
    }


}
